package br.gov.mi.corporativo.dominio.boundary.comum.tipointeresse;

import java.util.List;

import javax.jws.WebService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import br.gov.mi.corporativo.dominio.entidade.comum.TipoInteresse;
import br.gov.mi.corporativo.dominio.repositorio.comum.TipoInteresseRepositorio;
import br.gov.mi.infraestrutura.crud.CrudServicoImpl;

@Component
@Transactional(readOnly=true)
@WebService(endpointInterface = "br.gov.mi.corporativo.dominio.boundary.comum.tipointeresse.TipoInteresseEndPoint")
public class TipoInteresseServico extends
CrudServicoImpl<TipoInteresse, Long, TipoInteresseRepositorio>
implements TipoInteresseEndPoint {

	@Autowired
	public void setRepositorio(TipoInteresseRepositorio repositorio) {
		super.setRepositorio(repositorio);
	}
	
	
	public TipoInteresse recuperarPorNome(String nome) {
		return repositorio.findByNmTipoInteresse(nome);
	}

	public List<TipoInteresse> recuperarPorStatus(String status) {
		return repositorio.findByStAtivo(status);
	}

}
